<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
    <title>图文消息管理</title>
    <meta name="viewport" content="width=device-width, initial-scale=1.0"><!-- 确保适当的绘制和触屏缩放 -->
    <link rel="stylesheet" href="{$url_css}bootstrap.min.css" type="text/css">
    <link rel="stylesheet" href="{$url_css}admin.css" type="text/css">

    <script type="text/javascript" src="{$url_js}jquery-1.12.0.min.js"></script>
    <style type="text/css">
        {literal}
        .page_info div{display: inline-block;}
        .page_info .p_l{
            color: #666;
            float: left;
            line-height: 69px;
            font-size: 16px;
        }
        .page_info .p_r{
            color: #337AB7;
            float: right;
        }
        {/literal}
    </style>
</head>
<body>

<div class="container" style="width:96%">
    <table class="table table-bordered table-striped" align="center">
        <tr>
            <td colspan="6"><a href="?do=Edit" class="btn btn-info">添加图文消息</a></td>
        </tr>
    </table>
    <form action="?do=NoticeList" method="get">
        <table class="table table-bordered table-striped" align="center">
            <tr>
                <td colspan="6">查询条件</td>
            </tr>
            <tr>
                <td class="form-group col-xs-2">
                    <div class="input-group">
                        <div class="input-group-addon">标题</div>
                        <input type="text" class="form-control" name="title" placeholder="标题" value="{if $title}{$title}{/if}">
                    </div>
                </td>
                <td class="form-group col-xs-2">
                    <div class="input-group">
                        <div class="input-group-addon">当前状态</div>
                        <select class="form-control" name="status">
                            <option value="">全部</option>
                            <option value="0" {if $status==0}selected{/if}>未发送</option>
                            <option value="1" {if $status==1}selected{/if}>已发送</option>
                        </select>
                    </div>
                </td>
                <td class="form-group col-xs-2">
                    <div class="input-group">
                        <div class="input-group-addon">管理员ID</div>
                        <input type="text" class="form-control" name="admin_user_id" placeholder="管理员ID" value="{if $admin_user_id}{$admin_user_id}{/if}">
                    </div>
                </td>
                <td class="form-group col-xs-2" colspan="2" align="right">
                    <input type="submit" value="搜索" class="btn btn-primary" />
                </td>
            </tr>
        </table>
    </form>

    <table class="table table-bordered table-striped table-hover" align="center">
        <thead>
        <tr>
            <th style="width: 80px">ID</th>
            <th>标题</th>
            <th style="width: 130px">创建时间</th>
            <th style="width: 100px">当前状态</th>
            <th style="width: 100px">操 作</th>
        </tr>
        </thead>
        <tbody>
        {foreach $list as $val}
            <tr>
                <td align="center">{$val.Id}</td>
                <td><a title="{$val.Title|html}" href="?do=Edit&id={$val.Id}">{$val.Title|html}</a></td>
                <td align="center">{$val.CreateTime}</td>
                <td style="text-align: center;" id="status_{$val['Id']}">
                    {if $val['Status'] == 0}
                        未发送
                    {elseif $val['Status'] == 1}
                        已发送
                    {else}
                        <span style="color: darkgray;">隐藏</span>
                    {/if}
                </td>
                <td align="center">
                    <a class="btn btn-default" href="?do=Edit&id={$val.Id}">编辑</a>
                </td>
            </tr>
        {/foreach}
        <tr>
            <td colspan="13" align="right">
                <div class="page_info">
                    {if $page_info['count']}<div class="p_l">一共 {$page_info['count']} 条数据,共 {$page_info['page']} 页</div>{/if}
                    <div class="p_r">{$pagination}</div>
                </div>
            </td>
        </tr>
        </tbody>
    </table>
</div>
</body>
</html>